const joi = require('joi');

const project_name = joi.string().required();
const project_start_date = joi.date().required();
const project_first_date = joi.date().required();
const project_end_date = joi.date().required();
const project_type = joi.number().required();
const project_body = joi.string().required();
const project_service = joi.number().required();
const project_leader = joi.number().required();
const project_groups = joi.string().required();
const project_creator_id = joi.number().required();
const project_creator_date = joi.date().required();

const project_id = joi.number().required();

const start_date = joi.date().required();
const end_date = joi.date().required();

const page_num = joi.number().required();
const page_size = joi.number().required();

const project_ids = joi.string().required();

const project_images_ids = joi.string().required();
const project_rewrite_date = joi.date().required();

// 添加项目
exports.addProject_schema = {
	body: {
		project_name,
		project_start_date,
		project_first_date,
		project_end_date,
		project_type,
		project_body,
		project_service,
		project_leader,
		project_groups,
		project_creator_id,
		project_creator_date
	}
}

// 编辑项目
exports.updateProject_schema = {
	body: {
		project_name,
		project_start_date,
		project_first_date,
		project_end_date,
		project_type,
		project_body,
		project_service,
		project_leader,
		project_groups,
		project_creator_id,
		project_creator_date,
		
		project_id
	}
}

// 删除项目
exports.deleteProject_schema = {
	body: {
		project_id
	}
}

// 日历查询项目
exports.getProject_schema = {
	body: {
		start_date,
		end_date
	}
}

// 根据项目名查询项目
exports.getProjectName_schema = {
	body: {
		project_name,
		start_date,
		end_date
	}
}

// 查询项目详情
exports.getProjectBody_schema = {
	body: {
		project_id,
	}
}

// 分页查询项目列表
exports.getProjectList_schema = {
	body: {
		page_num,
		page_size
	}
}

// 批量删除项目
exports.deleteProjectList_schema = {
	body: {
		project_ids
	}
}

// 批量删除相册图片
exports.delete_project_image_schema = {
	body: {
		project_images_ids
	}
}

// 初稿提交
exports.project_first_draft_schema = {
	body: {
		project_id
	}
}

// 修改延长
exports.project_rewrite_schema = {
	body: {
		project_id,
		project_rewrite_date
	}
}

// 项目完结
exports.project_end_schema = {
	body: {
		project_id
	}
}

// 项目流单
exports.project_fail_schema = {
	body: {
		project_id
	}
}

// 删除项目文件
exports.delete_project_file_schema = {
	body: {
		project_id
	}
}